package pack21;

public class Program6 {
public static void main(String[] args) {
	String str="this is java program written in java language";
	int count = 0;
     String arr1[]=str.split(" ");  
     for(int i=0;i<arr1.length;i++)
     {
    	 if(arr1[i].equals("java"))
    		 count++;
     //System.out.println(arr1[i]);
     }
     System.out.println(count);
}
}
